% dsb3mean.m
% grabs and computes mean depth around
% drop point
% 3/28/01

clear
clf

stnloc=[-70.9951  -68.2561]; % B3
load q:\cruise\depthB3.dat
z=depthB3;

x=z(:,1);y=z(:,2);z=z(:,3);
m=find(z<10);
z(m)=[];x(m)=[];y(m)=[];

dLon=.015./60;
dLat=.03./60;
x1=stnloc(1)-dLon;
x2=stnloc(1)+dLon;
y1=stnloc(2)-dLat;
y2=stnloc(2)+dLat;

n=find(x>=x1 & x<=x2 & y>=y1 & y<=y2);
plot(x(n),y(n),'r*', stnloc(1),stnloc(2),'b*')
disp([mean(z(n))])
pause
plot(z(n))